# Contributor: Nicolas Lorin <androw95220@gmail.com>
# Maintainer: Tycho Andersen <tycho@docker.com>
pkgname=policycoreutils
pkgver=3.6
pkgrel=0
pkgdesc="SELinux policy core utilities"
url="https://selinuxproject.org/"
arch="all"
license="GPL-2.0-only"
makedepends="
	gettext-dev
	libsepol-dev
	libselinux-dev
	libsemanage-dev
	musl-fts-dev
	linux-pam-dev
	libcap-ng-dev
	audit-dev
	gawk
	"
subpackages="$pkgname-doc $pkgname-lang $pkgname-bash-completion"
source="https://github.com/SELinuxProject/selinux/releases/download/$pkgver/policycoreutils-$pkgver.tar.gz
	0002-hack-around-GLOB-BRACE-TILDE.patch
	0003-fix-pam-rules.patch
	busybox-install-compat.patch
	"
options="suid"

build() {
	make LDLIBS="$LDLIBS -lintl" LSPP_PRIV=y
}

package() {
	make LSPP_PRIV=y DESTDIR="$pkgdir" install
}

sha512sums="
e1f32e6e0310b879a5aadab157b103314a61bf3b8fd59c1212d701fbf39900e3b9a0b727338988103d784a7e505355a871ba519dd91520b135a3b9dae40bf1b0  policycoreutils-3.6.tar.gz
d611ca3107439fbdb9618a72f55cb66e299fa71392821b223343aa314c65af3e67d6e79ff40e93eca9a20dd0e90c660393c604a18048fcf293374cf2bc61e918  0002-hack-around-GLOB-BRACE-TILDE.patch
e3d1a658c76b80e694188049bde153a525a227c5e94cfc008537c15a7a7758ddf23b3cf64dd8c5aaa6d32ddeb5b468c6f95c17a82131fe8d8779695e96b56704  0003-fix-pam-rules.patch
4f6ccc3ce6d88a85c5550d55fb6b8bb3ca601bb3996b68964e31b790273a3a27f33e1ae420c4bd64964270a6cf97501344a27c3d5f0210c825e88378be07bd49  busybox-install-compat.patch
"
